<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::get('think', function () {
    return 'hello,ThinkPHP6!';
});


// 绑定当前的URL到 index模块
Route::bind('index');

// Route::get('/','index/index');
Route::rule('../search','search/index');            //搜索页面

Route::rule('show/:id','news/show');                //最终版文章页面
Route::redirect('show-:id','/show/:id',302);                //一版文章页面
Route::redirect('news/show-:id','/show/:id',302);           //初始文章页面

Route::rule('sort/:cid','news/index');              //最终版文章分类页面
Route::redirect('news/list-:cid','/sort/:cid',302);          //初始文章分类页面

Route::rule('photos/:cid','photos/index');          //最终版相册分类页面
Route::rule('xiuxing','about/show')->pattern(['var' => 'xiuxing']);



